package com.atguigu.gmall.order.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.common.util.JsonUtil;
import com.atguigu.gmall.model.to.ware.WareOrderTo;
import com.atguigu.gmall.model.to.ware.WareSplitVo;
import com.atguigu.gmall.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2024/10/16 23:08
 */
@RestController
@RequestMapping("/api/order")
public class OrderSplitController {
    @Autowired
    OrderService orderService;
    @PostMapping("/orderSplit")
    public String OrderSplit(WareSplitVo wareSplitVo){

        List<WareOrderTo> childOrder=orderService.OrderSplit(wareSplitVo);
        return JsonUtil.obj2Json(childOrder);
    }
}
